package com.yunxi.sat.service;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.LoginInfo;
import com.yunxi.sat.pojo.FollowRemindVO;
import com.yunxi.sat.pojo.SatCustomerFollowCountVO;
import com.yunxi.sat.pojo.SatCustomerFollowVO;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 客户跟进记录表 服务类
 * </p>
 *
 * @author caoYong
 * @since 2019-07-11
 */
public interface SatCustomerFollowDubboService {

    SatCustomerFollowVO getById(String id) throws Exception;

    ApiResult saveOrUpdate(SatCustomerFollowVO satCustomerFollowVO, LoginInfo loginInfo) throws Exception;

    void addFollow(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo) throws Exception;

    void complete(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo) throws Exception;

    void removeById(String id);

    PageInfo<SatCustomerFollowVO> findPageByVO(SatCustomerFollowVO satCustomerFollowVO, Integer pageNum, Integer pageSize, LoginInfo loginInfo) throws Exception;

    void removeByListVo(List<SatCustomerFollowVO> satCustomerFollowVOList) throws Exception;

    List listByVo(SatCustomerFollowVO satCustomerFollowVO);

    void del(List<String> list,String updateBy)throws Exception;

    List<SatCustomerFollowVO> getFollowsByNo(String customerNo,LoginInfo loginInfo)throws Exception;

    PageInfo<SatCustomerFollowVO> getFollowsByNoForPage(String customerNo,LoginInfo loginInfo,Integer pageNum,Integer pageSize)throws Exception;

    List<SatCustomerFollowVO> getWaitFollowsByNo(String customerNo,LoginInfo loginInfo)throws Exception;

    /**
     * 订单创建完成即生成一条已跟进记录
     * 变更客户级别为O级
     * 生成一条待交车记录
     * @param orderCustomerId 订单主键
     * @param planHandleVehicleTime 预计交车时间
     * @throws Exception
     */
    void orderCustomerFollow(String orderCustomerId, Date planHandleVehicleTime,boolean isCreateOrder,boolean isNewHandleVehicleInfo,LoginInfo loginInfo)throws Exception;

    /**
     * 待跟进客户
     * @param satCustomerFollowVO
     * @param loginInfo
     * @return
     * @throws Exception
     */
    List<SatCustomerFollowVO> waitFollow(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo)throws Exception;

    PageInfo<SatCustomerFollowVO> waitFollowForPage(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo,Integer pageNum,Integer pageSize)throws Exception;

    /**
     * 逾期未跟进
     * @param satCustomerFollowVO
     * @param loginInfo
     * @return
     * @throws Exception
     */
    List<SatCustomerFollowVO> lateFollow(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo)throws Exception;

    PageInfo<SatCustomerFollowVO> lateFollowForPage(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo,Integer pageNum,Integer pageSize)throws Exception;

    /**
     * 老客户跟进
     * @param satCustomerFollowVO
     * @param loginInfo
     * @return
     * @throws Exception
     */
    List<SatCustomerFollowVO> goodCustomerFollow(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo)throws Exception;

    PageInfo<SatCustomerFollowVO> goodCustomerFollowForPage(SatCustomerFollowVO satCustomerFollowVO,LoginInfo loginInfo,Integer pageNum,Integer pageSize)throws Exception;

    /**
     * 今日跟进提醒报表
     * @param loginInfo
     * @return
     * @throws Exception
     */
    FollowRemindVO followRemind(LoginInfo loginInfo)throws Exception;

    /**
     * 获取用户职位
     * @param loginInfo
     * @return
     */
    public String getPositionCode(LoginInfo loginInfo);

    List<SatCustomerFollowCountVO> getWaitFollowCount(LoginInfo loginInfo)throws Exception;
}
